package mr.go.set.samples;

import mr.go.set.Aggregator;

public final class Counter implements Aggregator<Integer> {

	@Override
	public Integer aggregate(Integer value, Integer current) {
		if (value == null)
			return current + 1;
		return current + value;
	}

	@Override
	public Integer initial() {
		return 1;
	}

}
